package team.first.movieapiv2pro.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

/**
 * @Author: HAPPY
 * @Project_name: project
 * @Package_name: team.first.mongodb.vo
 * @Date: 2021/11/25 8:43
 * @Description: 返回给前端的数据封装类
 */
@Setter
@Getter
@ToString
@Accessors(chain = true)
@ApiModel("apiResponsePaging")
public class ApiResponsePaging<T> {
    /**
     * 状态码
     */
    @ApiModelProperty(value = "状态码", example = "200")
    private Integer code;

    /**
     * 成功与否
     */
    @ApiModelProperty(value = "成功与否", example = "true")
    private boolean success;

    /**
     * 状态消息
     */
    @ApiModelProperty(value = "状态消息", example = "请求成功")
    private String message;

    /**
     * 数据信息
     */
    @ApiModelProperty(value = "数据信息")
    private T data;

    /**
     * 分页信息
     */
    @ApiModelProperty(value = "当前页码", example = "5")
    private Integer pageNumber;

    @ApiModelProperty(value = "每页大小", example = "10")
    private Integer pageSize;

    @ApiModelProperty(value = "总页数", example = "20")
    private Integer totalPage;

    @ApiModelProperty(value = "总记录数", example = "200")
    private Integer totalRow;
}
